package View.SetupScreens;

import java.awt.CardLayout;

import javax.swing.JPanel;
import Model.Game;
import Presenter.MainGameScreen;

/**
 * Makes the containing JPanel for all the setup screens
 * @author Emily
 *
 */
public class SetupScreenContainer extends JPanel {

	private static final long serialVersionUID = 1L;
	public WelcomeToMuleScreen welcome;
	public DifficultySelect difficulty;
	public MapSelect map; // JPanel map;
	public NumOfPlayersChooser number;
	public RaceChooser race;
	public ColorChooser color;
	public NameSetter  names;
	public GameStats stats;
	//public MainGameScreen mainGameScreen;

	/**
	 * Instantiates the setup screens and add them to the cardLayout.
	 * @param game
	 * @param gameScreens
	 */
	public SetupScreenContainer(final Game game, final CardLayout gameScreens){
		welcome = new WelcomeToMuleScreen();
		difficulty = new DifficultySelect(game);
		map = new MapSelect(game);
		number = new NumOfPlayersChooser(game);
		race = new RaceChooser(game);
		color = new ColorChooser(game);
		names = new NameSetter(game);
		stats = new GameStats(game);
		
		add(welcome);
		add(difficulty);
		add(map);
		add(number);
		add(race);
		add(color);
		add(names);
		add(stats);
		setLayout(gameScreens);

		gameScreens.addLayoutComponent(welcome, "welcome");
		gameScreens.addLayoutComponent(difficulty, "Difficulty");
		gameScreens.addLayoutComponent(map, "Map");
		gameScreens.addLayoutComponent(number, "number");
		gameScreens.addLayoutComponent(race, "race");
		gameScreens.addLayoutComponent(color, "color");
		gameScreens.addLayoutComponent(names, "names");
		gameScreens.addLayoutComponent(stats, "stats");
	}
	
}
